from flask import Flask

import setting
from .views import blue
from .exts import db

# 创建Flask应用

def creat_app():
    # 初始化
    app = Flask(__name__)
    app.config.from_object(setting.DevelopmentConfig)

    # 绑定ORM
    db.init_app(app)

    # 绑定蓝图
    app.register_blueprint(blueprint=blue)

    return app